package com.bgy.geek.controller;

import com.bgy.geek.dto.CalcEffeDTO;
import com.bgy.geek.dto.ProjSourceSummaryDTO;
import com.bgy.geek.entity.ProjSourceDetailQuery;
import com.bgy.geek.vo.CalcEffeVO;
import com.bgy.geek.vo.ProjSourceSummaryVO;
import com.bgy.geek.service.TbStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author chenshuangrui
 * @date 2021/10/21
 * @note
 */
@RestController
@RequestMapping("/statistics")
public class TbStatisticsController {

	@Autowired
	private TbStatisticsService tbStatisticsService;

	@PostMapping("/findProjSourceDetail")
	public List<ProjSourceSummaryVO> findProjSourceDetail(@RequestBody ProjSourceDetailQuery psd) {
		List<ProjSourceSummaryVO> detail = tbStatisticsService.findProjSourceDetail(psd);
		return detail;
	}
	@PostMapping("/findProjSourceSummary")
	public List<ProjSourceSummaryVO> findProjSourceSummary(@RequestBody ProjSourceSummaryDTO pss) {
		List<ProjSourceSummaryVO> detail = tbStatisticsService.findProjSourceSummary(pss);
		return detail;
	}
	@PostMapping("/calcEffe")
	public List<CalcEffeVO> calcEffe(@RequestBody CalcEffeDTO ce) {
		List<CalcEffeVO> detail = tbStatisticsService.calcEffe(ce);
		return detail;
	}
}
